import request from "@/utils/request"

export function getMenuList() {
    return request({
        url: '/auth/menu/list',
        method: 'get',
    })
}
export function getMenuInfo(id) {
    return request({
        url: '/auth/menu/info?id=' + id,
        method: 'get'
    })
}

export function deleteMenuInfo(id) {
    return request({
        url: '/auth/menu/delete?id=' + id,
        method: 'delete'
    })
}

export function saveMenuInfo(data) {
    return request({
        url: '/auth/menu/save',
        method: "post",
        data
    })
}

export function getMenuPermissions(id) {
    return request({
        url: '/auth/menu/permissions?id=' + id,
        method: 'get'
    })
}

export function visble(id) {
    return request({
        url: '/auth/menu/visble?id=' + id,
        method: 'post'
    })
}

export function sort(id, value) {
    return request({
        url: '/auth/menu/sort?id=' + id + "&value=" + value,
        method: 'post'
    })
}

export function authoriza(data) {
    return request({
        url: '/auth/menu/authoriza',
        method: 'post',
        data
    })
}

export function dictionary() {
    return request({
        url: '/auth/menu/dictionary',
        method: 'get'
    })
}